﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MarvinsArena.Core;

namespace BattleLogic
{
	public class Bullet : ILogicObject, IBullet
	{

		public string Name { get; set; }
		public double PositionX { get; set; }
		public double PositionY { get; set; }
		public double Radius { get { return 8.0f; } }
		public double Rotation { get; set; }
		public TypeWorldObjects TypeWorldObject { get { return TypeWorldObjects.Bullet; } }
		
		public double MoveSpeed { get { return 0.1; } }
		public int Power { get; private set; }

		public bool Dead { get; set; }


		public Bullet(int power)
		{
			this.Name = "Bullet";
			this.Power = power;
			this.Dead = false;
		}

		public void Update(double deltaTime)
		{
			this.PositionX += this.MoveSpeed * deltaTime * Math.Cos(this.Rotation);
			this.PositionY += this.MoveSpeed * deltaTime * Math.Sin(this.Rotation);
		}

	}
}
